package com.jt.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


@Data //该注解的作用是：动态的生成get/set/tostring....方法
@NoArgsConstructor //自动添加无参构造
@AllArgsConstructor //自动添加全参构造
@Accessors(chain = true) //设置开启链式加载，实际（重写set方法）
public class User {
    private Integer id;
    private String name;
    private Integer age;
    private String sex;

    //链式加载的源码，this代表当前对象
    /*
    public User setId(Integer id){
        this.id = id;
        return this;
    }
    public User setName(String name){
        this.name = name;
        return this;
    }
    */
}
